<!DOCTYPE html>
  <html>
  <head>
      <meta charset="utf-8">
      <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
      <title>个人中心</title>
      <link rel="stylesheet" type="text/css" href="../../css/api.css" />
      <link rel="stylesheet" type="text/css" href="../../css/common.css" />
      <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    	<link rel="stylesheet" type="text/css" href="../../css/aui-pull-refresh.css" />
      <style>
          html, body {width: 100%;min-height: 100%;background: #F3EFEE;}
          .aui-active .aui-bar-tab-label{
            color: #f5a51c
          }
          .login {height:10rem;position: relative;background: url(../../image/my_bg.png) center center/cover no-repeat;}
      	.login .personal_logo {margin: 0 auto 9px;/*position: absolute; top: 60px; left: 20px;*/}
      		.login .userinfo {position: absolute;text-align: center; left: 0; right: 0;}
      		.login .userinfo .title {font-size: 0.8rem; color: #fff;}

      		/* 设置条目 */
      		.item {height: 3rem;line-height: 3rem;padding-left: 0.7rem;background-color: #fff;}
      		.item_ico {float: left;width: 2.3rem;padding: 0.7rem 0.7rem 0.7rem 0;}
      		.item_arrow {float: right;width: 1.5rem;padding: 1rem 0.7rem 1rem 0;}
      		.item span {font-size: 0.7rem;}
          .myshop_bouned_main{
            display: flex;
            align-items: center;
            justify-content: space-around;
            margin-bottom: 0.3rem
          }
          .myshop_bouned_title{
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding-left: 0.75rem;
            padding-right: 0.75rem;
            margin-bottom: 2rem;
          }
          .myshop_bouned_content{
            position: fixed;
            bottom: 0;
            z-index: 9999;
            background: #fff;
            width: 100vw;
            display:none;
          }
      </style>
  </head>
  <body>
<div id="app" v-cloak>
  <div class="aui-content login" style="padding-top:25px">

    <div class=""  tapmode="">
      <!-- <img src="../../image/personal_bkg.jpg" alt="" class="loginbg"> -->

      <div class="userinfo" >
        <div class="userHerder">
          <div class="aui-pull-left" onclick="goback()">
              <span class="aui-iconfont aui-icon-left"  style="color:#fff"></span>
          </div>
          <div class="userMy">我的钱包</div>
          <div style="color:#fff;font-size:0.6rem" onclick="price_about()">明细</div>
        </div>
        <div class="userContent">
          <div style="color:#fff;font-size:1.5rem;">{{balance}}</div>
          <div style="color:#fff;font-size: 0.7rem;">我的余额</div>
        </div>

      </div>

    </div>
  </div>
  <ul class="aui-list aui-media-list">
      <li class="aui-list-item aui-list-item-middle"  onclick="brokerage()">
        <div class="aui-media-list-item-inner">
            <div class="aui-list-item-media" style="width:2.2rem;">
                <img src="../../image/my/m50.jpg" class="aui-img-round aui-list-img-sm">
            </div>
            <div class="aui-list-item-inner aui-list-item-arrow">
                <div class="aui-list-item-text">
                    <div class="aui-list-item-title aui-font-size-14">佣金</div>
                    <div class="aui-list-item-right" style="font-size: 0.7rem;color: #999;">{{commission}}元</div>
                </div>
            </div>
        </div>
      </li>
      <li class="aui-list-item aui-list-item-middle">
        <div class="aui-media-list-item-inner">
            <div class="aui-list-item-media" style="width:2.2rem;">
                <img src="../../image/my/m51.jpg" class="aui-img-round aui-list-img-sm">
            </div>
            <div class="aui-list-item-inner aui-list-item-arrow">
                <div class="aui-list-item-text">
                    <div class="aui-list-item-title aui-font-size-14">兑换币</div>
                    <div class="aui-list-item-right" style="font-size: 0.7rem;color: #999;">{{exchange}}元</div>
                </div>
            </div>
        </div>
      </li>
      <li class="aui-list-item aui-list-item-middle">
        <div class="aui-media-list-item-inner">
            <div class="aui-list-item-media" style="width:2.2rem;">
                <img src="../../image/my/m52.jpg" class="aui-img-round aui-list-img-sm">
            </div>
            <div class="aui-list-item-inner aui-list-item-arrow">
                <div class="aui-list-item-text">
                    <div class="aui-list-item-title aui-font-size-14">积分</div>
                    <div class="aui-list-item-right" style="font-size: 0.7rem;color: #999;">{{integral}}元</div>
                </div>
            </div>
        </div>
      </li>
      <li class="aui-list-item aui-list-item-middle" onclick="withdraw()">
          <div class="aui-media-list-item-inner">
              <div class="aui-list-item-media" style="width:2.2rem;">
                  <img src="../../image/my/m48.jpg" class="aui-img-round aui-list-img-sm">
              </div>
              <div class="aui-list-item-inner aui-list-item-arrow">
                  <div class="aui-list-item-text">
                      <div class="aui-list-item-title aui-font-size-14">提现</div>

                  </div>
              </div>
          </div>
        </li>
        <li class="aui-list-item aui-list-item-middle" onclick="openWin_head('bankCard','我的银行卡')">
            <div class="aui-media-list-item-inner">
                <div class="aui-list-item-media" style="width:2.2rem;">
                    <img src="../../image/my/m49.jpg" class="aui-img-round aui-list-img-sm">
                </div>
                <div class="aui-list-item-inner aui-list-item-arrow">
                    <div class="aui-list-item-text">
                        <div class="aui-list-item-title aui-font-size-14">我的银行卡</div>

                    </div>
                </div>
            </div>
          </li>
          <li><div class="user_nav_line"></div></li>
          <li class="aui-list-item aui -list-item-middle" onclick="recharge()">
              <div class="aui-media-list-item-inner">
                  <div class="aui-list-item-media" style="width:2.2rem;">
                      <img src="../../image/my/m47.jpg" class="aui-img-round aui-list-img-sm">
                  </div>
                  <div class="aui-list-item-inner aui-list-item-arrow">
                      <div class="aui-list-item-text">
                          <div class="aui-list-item-title aui-font-size-14" style="top: 0.2rem;">充值</div>

                      </div>
                  </div>
              </div>
            </li>
    </ul>

</div>
  </body>
  <script type="text/javascript" src="../../script/api.js"></script>
  <script type="text/javascript" src="../../script/zepto.js"></script>
  <script type="text/javascript" src="../../script/vue.min.js"></script>
  <script type="text/javascript" src="../../script/utils.js"></script>
  <script type="text/javascript" src="../../script/common.js"></script>
  <script type="text/javascript" src="../../script/aui-tab.js"></script>
  <script type="text/javascript" src="../../script/aui-scroll.js"></script>
  <script type="text/javascript" src="../../script/aui-pull-refresh.js"></script>
  <script type="text/javascript">
    function recharge(){
      api.openWin({
          name: 'recharge',
          url: './headerone.html',
          pageParam: {
                msg:'充值',
                url:'./recharge.html'
          }
      });
    }
    function openWin_head(name,type) {
      api.openWin({
          name: name,
          url: './five_frame_header.html',
          pageParam: {
                type:type,
                name:name
          }
      });
    }
    function withdraw(){
      api.openWin({
          name: 'withdraw',
          url: './headerone.html',
          pageParam: {
                msg:'提现',
                url:'./withdraw.html'
          }
      });
    }
    function brokerage(){
      api.openWin({
          name: 'mybrokerage',
          url: './headerone.html',
          pageParam: {
                msg:'我的佣金',
                url:'./mybrokerage.html'
          }
      });
    }
      function price_about(){
        api.openWin({
            name: 'priceAbout',
            url: './headerone.html',
            pageParam: {
                  msg:'资金明细',
                  url:'./priceAbout.html'
            }
        });

      }
      function goback(){
        api.closeWin();
      }


      apiready = function(url){
          var app =new Vue({
            el:"#app",
            data:{
              balance:'0.00',
              commission:'0.00',
              integral:'0.00',
              exchange:'0.00',
              token: '',
            },
            created:function() {
              var $_this = this;
              $_this.token = $api.getStorage('token');

              api.ajax({
                  url: window.Url.Freeucenter_withdrawalsData,
                  method: 'post',
                  data: {
                      values: {
                         token:$_this.token,
                      }
                  }
              },function(ret, err){
                  if (ret.re==1) {
                      $_this.balance = Base64.decode(ret.data.balance).slice(3,-5)
                      $_this.commission = Base64.decode(ret.data.commission).slice(3,-5)
                      $_this.integral = Base64.decode(ret.data.integral).slice(3,-5)
                      $_this.exchange = Base64.decode(ret.data.exchange).slice(3,-5)
                        console.log( Base64.decode(ret.data.balance) +'--------------------------'+Base64.decode(ret.data.commission) );
                  }else {
                    console.log( JSON.stringify( ret ) );
                  }
              });
            },
          })
      };


      //刷新
      function setRefresh() {
          var pullRefresh = new auiPullToRefresh({
              container: document.querySelector('.aui-refresh-content'),
              triggerDistance: 100
          }, function(ret) {

              if (ret.status == "success") {
                  setTimeout(function() {
                      pullRefresh.cancelLoading(); //刷新成功后调用此方法隐藏
                  }, 1500)
              }
          })
      }

  </script>
  </html>
